//
//  XLGProtocolRequestAddress.m
//  etionCBLogic
//
//  Created by wjxfhxy on 15-7-2.
//  Copyright (c) 2015年 GuangZhouXuanWu. All rights reserved.
//

#import "XLGProtocolRequestAddress.h"

@implementation XLGProtocolRequestAddress
{
    NSString *_ip;
    NSUInteger _port;
    NSString *_website;
    
    BOOL _longConnect;
}

@synthesize ip = _ip;
@synthesize port = _port;
@synthesize website = _website;
@synthesize longConnect= _longConnect;

static XLGProtocolRequestAddress*(^s_requestAddress)(NSString *URI) = NULL;

-(id)initWithIP:(NSString*)ip port:(NSUInteger)port
{
    self = [super init];
    self.ip=ip;
    self.port=port;
    return self;
}

-(id)initWithWebsite:(NSString*)website
{
    self = [super init];
    self.website=website;
    return self;
}

-(id)initWithWebsite:(NSString*)website port:(NSUInteger)port
{
    self = [super init];
    self.website=website;
    self.port=port;
    return self;
}

-(void)dealloc
{
    [_website release_mm];
    [_ip release_mm];
    superdealloc_mm;
}

+ (void)protocolRequestAddress:(XLGProtocolRequestAddress*(^)(NSString *URI))address
{
    s_requestAddress = Block_copy(address);
}

+ (XLGProtocolRequestAddress*(^)(NSString *URI))protocolRequestAddress
{
    return s_requestAddress;
}

@end
